<?php
namespace app\base\event;

use app\base\model;
class Configs
{
        public $model ;
        public function __construct(){
                    $this->model = new \app\base\model\Configs;
                    $this->modelGroup = new \app\base\model\ConfigGrop;
        }


    /**
     * @param $id
     * @return mixed  获取单一配置id config
     */
        public function get_config_idsss($id){
                    return $this->model->get_config_id($id);
        }


        //通过组id 获取整个组配置
        public function get_config_groupid($id){
                    return $this->model->get_config_groupid($id);
        }



        //通过group里的key 搜索
        public function get_ckkey($cd_key){
            $rows =  $this->modelGroup->get_config_bycd_key($cd_key);
            return $this->model->get_config_groupid($rows['id']);
        }

}
